package fr.vvins.core.catalog.entity.dao;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import fr.vvins.core.catalog.entity.Vigneron;

@Repository
public interface VigneronRepository extends CrudRepository<Vigneron, Integer> {

	@Query("from Vigneron where content.key = ?1")
	public Vigneron findByContentKey(String key);
	
	@Query("from Vigneron where content.id = ?1")
	public Vigneron findByContent(Integer id);
	
}
